-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: wifi: Add WLAN wakeup for MIMXRT1060-EVK #92067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
e4087f6
to
c2870d4
Compare
Please use correct board name MMXRT1060-EVK instead of EVKC1060 in the PR name & description. |
c2870d4
to
dfbf29b
Compare
Updated. Thanks! |
4d6b813
to
86f5da9
Compare
#ifdef CONFIG_NXP_RW610 | ||
return POWER_GetWakeupStatus(WL_MCI_WAKEUP0_IRQn); | ||
#elif CONFIG_NXP_IW610 | ||
return GPC_GetIRQStatusFlag(GPC, GPIO1_Combined_0_15_IRQn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type of wakeup code should be in the GPIO driver and not in the driver. The driver should only have to use the GPIO_INT_WAKEUP
flag in the device tree node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For IW610, we use OOB wakeup as WLAN wakeup method. This means if firmware received WLAN packet that matches wakeup condition, firmware will toggle the specific GPIO0_1. This GPIO pin is on M2 port (IW610 will be attached here) of EVKC1060 and is used for WLAN specifically. I think it is a proper way to add it in WLAN driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, where are you configuring the GPIO interrupt
to be wakeup capable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I consulted someone from EP team about this and he told me that all interrupts were enabled as wakeup sources by default. Checked value of GPC->IMR1 ~ GPC->IMR5 registers and confirmed. This was also confirmed during tests.
Therefore, no additional action needed for GPIO wakeup capable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at this PR: #95813
This should allow removing the platform specific #defines
from this driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed your PR and noticed that you added new macro define NXP_GET_WAKEUP_SIGNAL_STATUS(irqn) in all NXP socs. But the IRQ number is different for different platform, I think the platform specific defines are still needed.
Maybe it could be like this:
#ifdef CONFIG_NXP_RW610
#define WAKEUP_IRQ WL_MCI_WAKEUP0_IRQn
#elif CONFIG_NXP_IW610
#define WAKEUP_IRQ GPIO1_Combined_0_15_IRQn
#else
#define WAKEUP_IRQ 0
#endif
...
static bool nxp_wifi_wlan_wakeup(void)
{
return NXP_GET_WAKEUP_SIGNAL_STATUS(WAKEUP_IRQ);
}
Please add your comment. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can get the Wakeup IRQ from Device Tree. You could use interrupt-names
to name the interrupts and use DT_IRQ_BY_NAME
and DT_IRQ_HAS_NAME
to get the wakeup interrupt.
For the one's that needs GPIO, this can be set at the board-level dts file.
26aa4f7
to
510dd12
Compare
510dd12
to
9a4cf32
Compare
@jukkar , please review |
Added wlan wakeup pin in IW610 overlay file. This WLAN wakeup support is for IW610 and MIMXRT1060-EVK acts as host. Add wakeup pin configuration when doing device related initialization. Signed-off-by: Hui Bai <[email protected]>
9a4cf32
to
ec2240f
Compare
@jukkar , the HAL side has merged and the PR was updated to resolve conflicts in |
|
@jukkar I added myself as assignee since it is all NXP files ... and we are trying to sequence some HAL PRs. |
Added wlan wakeup pin in MIMXRT1060-EVK dts file. This WLAN wakeup support is for IW610 and MIMXRT1060-EVK acts as host. Add wakeup pin configuration when doing device related initialization.